package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class SequenceGeneratorOptions {

    private int beginIndex;
    private int endIndex;
    private List<SequenceGeneratorOption> sequenceGeneratorOptionList;

    public SequenceGeneratorOptions(List<SequenceGeneratorOption> sequenceGeneratorOptionList) {
        this.beginIndex = sequenceGeneratorOptionList.get(0).getBeginIndex();
        this.endIndex = sequenceGeneratorOptionList.get(sequenceGeneratorOptionList.size() - 1).getEndIndex();
        this.sequenceGeneratorOptionList = sequenceGeneratorOptionList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return sequenceGeneratorOptionList.size();
    }

    public SequenceGeneratorOption get(int index) {
        return sequenceGeneratorOptionList.get(index);
    }

}
